<%@ page language="java" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
    <base href="<%=basePath%>">
    
    <title>index</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	
  </head>
  <script type="text/javascript">
   	 var strTime,strDate;
   	 function webClock()
   	 {
   	 	var dNow = new  Date();
   	 	var dHour =dNow.getHours();
   	 	var dMinute = dNow.getMinutes();
   	 	var dSecond = dNow.getSeconds();
   	 	
   	 	var dDate= dNow.getDate();
   	 	var dMonth= dNow.getMonth();
   	 	var dYear= dNow.getYear();
   	 	var day= dNow.getDay();
   	 	var week
   	 	if(day==0)
   	 	week="星期日";
   	 	if(day==1)
   	 	week="星期一";
   	 	if(day==2)
   	 	week="星期二";
   	 	if(day==3)
   	 	week="星期三";
   	 	if(day==4)
   	 	week="星期四";
   	 	if(day==5)
   	 	week="星期五";
   	 	if(day==6)
   	 	week="星期六";
   	 	
   	 	strTime= "" + dHour;
   	 	strTime+=((dMinute<10)?":0":":")+dMinute;
   	 	strTime+=((dSecond<10)?":0":":")+dSecond;
   	 	
   	 	
   	 	strDate= "" + dYear;
   	 	strDate+=((dMonth<10)?"/0":"/")+dMonth;
   	 	strDate+="/"+dDate;
   	 	setTimeout("webClock()",1000);
   	 	
   	 	document.clock.time.value = strDate+" " +week+" "+strTime;
   	 	
   	 }
  </script>
  
  <body onload="webClock();" >
  <div style="text-align:left">
   <form name="clock" >
   <input type="text" id="time" name="time" size="25" readolny="true"><br>
   </form>
    </div>
     </body>
    
</html>
